/**
 * 删除表
 */
function dropTab(){
	$.messager.progress({
        msg:'正在创建数据表...'
    });
	
    /**
     * 删除信息查验表
     */
	dropXXCY(createXXCY);
	/**
	 * 删除机构表
	 */
	dropOrgan(createOrgan);
	
	/**
	 * 删除部门表
	 */
	dropDepart(createDepart);
	
	/**
	 * 删除用户表
	 */
	dropUser(createUser);
	
	/**
	 * 删除抽屉表
	 */
	dropDrawer(createDrawer);
	
	/**
	 * 删除机构环节文书关联表
	 */
	dropCaseLinkDocument(createCaseLinkDocument);
	
	/**
	 * 删除案件编号表
	 */
	dropCaseNumber(createCaseNumber);
	
	/**
	 * 删除机构执法门类
	 */
	dropOrganZfml(createOrganZfml);
	
	/**
	 * 删除违法行为表
	 */
	dropCaseCause(createCaseCause);
	
	/**
	 * 删除法条表
	 */
	dropLawContent(createLawContent);
	
	/**
	 * 删除自由裁量权表
	 */
	dropDiscretion(createDiscretion);
	
	/**
	 * 删除立案地址表
	 */
	dropCaseFillingPlace(createCaseFillingPlace);
	
	/**
	 * 删除执法人员表
	 */
	dropCaseSTAFF(createCaseSTAFF);
	
	
	/**
	 * 删除行政处罚种类表
	 */
	dropAdministrativePunishment(createAdministrativePunishment);
	
	/**
	 * 删除案件版本号表
	 */
	dropCaseVersion(createCaseVersion);
	
	/**
	 * 删除文书表
	 */
	dropTables();	
}
createTab();
/**
 * 删除文书表
 */
function dropTables(){
	dropCaseBasicInfo(createCaseBasicInfo);
	dropCaseBasicInfoCl(createCaseBasicInfoCl);
	dropReportRecord(createReportRecord);
	dropAdminEnforceApplication(createAdminEnforceApplication);
	dropAssistInvest(createAssistInvest);
	dropAvoidApply(createAvoidApply);
	dropAvoidApplyAgree(createAvoidApplyAgree);
	dropAvoidApplyReject(createAvoidApplyReject);
	dropCaseProcessIdea(createCaseProcessIdea);
	dropCaseProcessIdeaDetail(createCaseProcessIdeaDetail);
	dropDelayPayfineApply(createDelayPayfineApply);
	dropDelayPayfineApplyAgree(createDelayPayfineApplyAgree);
	dropDocumentReceipt(createDocumentReceipt);
	dropDocumentReceiptDetail(createDocumentReceiptDetail);
	dropEntrustIdentifyDetail(createEntrustIdentifyDetail);
	dropEntrustIdentify(createEntrustIdentify);
	dropEvidenceList(createEvidenceList);
	dropEvidenceListDetail(createEvidenceListDetail);
	dropEvidenceTreatmentDecision(createEvidenceTreatmentDecision);
	dropFillingApprove(createFillingApprove);
	dropHearingBulletin(createHearingBulletin);
	dropHearingEntrust(createHearingEntrust);
	dropHearingNotes(createHearingNotes);
	dropHearingNotice(createHearingNotice);
	dropHearingReport(createHearingReport);
	dropIdentifyOpinion(createIdentifyOpinion);
	dropIllegalAction(createIllegalAction);
	dropImportantCaseGroupDiscussion(createImportantCaseGroupDiscussion);
	dropInquestNotes(createInquestNotes);
	dropInquiryNotes(createInquiryNotes);
	dropNondelayPayfineApply(createNondelayPayfineApply);
	dropNonpunishmentDecision(createNonpunishmentDecision);
	dropOrderCorrect(createOrderCorrect);
	dropPunishementDecision(createPunishementDecision);
	dropPunishmentFinalReport(createPunishmentFinalReport);
	dropSampleEvidence(createSampleEvidence);
	dropSampleEvidenceDetail(createSampleEvidenceDetail);
	dropSceneNotes(createSceneNotes);
	dropSpotPunishmentDecision(createSpotPunishmentDecision);
	dropStatementExplain(createStatementExplain);

}
/**
 * 初始化机构、部门、用户、抽屉、机构环节文书表、信息查验数据
 **/
function createTab(){
	/**
	 * 创建信息查验表
	 **/
	createXXCY();
	
	/**
	 * 创建机构表
	 **/
	createOrgan();

	/**
	 * 创建部门表
	 **/
	createDepart();

	/**
	 * 创建用户表
	 **/
	createUser();

	/**
	 * 创建抽屉表
	 **/
	createDrawer();

	/**
	 * 创建机构环节文书关联表
	 **/
	createCaseLinkDocument();

	/**
	 * 创建案件编号表
	 **/
	createCaseNumber();

	/**
	 * 创建机构执法门类表
	 **/
	createOrganZfml();

	/**
	 * 创建违法行为表
	 **/
	createCaseCause();

	/**
	 * 创建法条表
	 **/
	createLawContent();

	/**
	 * 创建自由裁量权表
	 **/
	createDiscretion();

	/**
	 * 创建立案地址表
	 **/
	createCaseFillingPlace();

	/**
	 * 创建执法人员表
	 **/
	createCaseSTAFF();
	
	/**
	 * 创建行政处罚种类表
	 **/
	createAdministrativePunishment();

	/**
	 * 创建案件版本号表
	 **/
	createCaseVersion();

	/**
	 * 创建文书表
	 */
	createTables();
}


/**
 * 创建信息查验表
 **/
function createXXCY(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS XXCY(" +
			            "TYPE VARCHAR(255)," +                  //类型  户、车、人
			            "URL VARCHAR(30) "+                 //接口url
			            ")", 
			            [], 
			            function(tx,result){ 
			            }, 
			            function(tx,error){
			            	message('创建信息查验表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建机构表 organ
 **/
function createOrgan(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS ORGAN(" +
			            "ID VARCHAR(100)," +                 //机构表主键
			            /*"CREATETIME VARCHAR(20)," +*/
			            "NAME VARCHAR(255)," +             //机构名称
			            "SORT VARCHAR(100)," +               //序号
			            "STATUS VARCHAR(255),"+            //有效
			            "CODE VARCHAR(255),"+              //代码
			            "PID VARCHAR(100),"+                  //父节点ID
			            "XZQHID BIGINT(20),"+                //行政区划ID
			            "ADDRESS VARCHAR(255),"+              
			            "ZIPCODE VARCHAR(255),"+              
			            "CONTACTOR VARCHAR(255),"+              
			            "TELEPHONE VARCHAR(255),"+    
			            "ACCOUNT VARCHAR(255),"+   
			            "BANK VARCHAR(255),"+   
			            "GOVERNMENT VARCHAR(255),"+   
			            "RECONSIDERATIONORGAN VARCHAR(255)"+   
			            ")", 
			            [], 
			            function(tx,result){
			            	if(typeof('callback')=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建机构表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建部门表 depart
 **/
function createDepart(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS DEPART(" +
			            "ID VARCHAR(100)," +                  //主键
			            /*"CREATETIME VARCHAR(20)," +*/
			            "NAME VARCHAR(255)," +              //部门名称
			            "SORT VARCHAR(100)," +                //序号
			            "STATUS VARCHAR(255),"+             //状态
			            "CODE VARCHAR(255),"+               //代码
			            "PID VARCHAR(100),"+                  //父节点ID
			            "OID VARCHAR(100)"+                   //机构ID
			            ")", 
			            [], 
			            function(tx,result){
			            	//message('创建部门表成功');
			            }, 
			            function(tx,error){
			            	message('创建部门表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建用户表 user
 **/
function createUser(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS USER(" +
			            "ID BIGINT(20)," +                       //用户主键
			            /*"CREATETIME VARCHAR(20)," +
			            "DESCRIPTION VARCHAR(255)," +*/
			            "EMAIL VARCHAR(255)," +                  //电子邮件
			            "IDENTITY VARCHAR(30),"+                 //证件号码
			            "MOBILE VARCHAR(255),"+                  //手机号码
			            /*"PASSWORD VARCHAR(255),"+    */            
			            "NPASSWORD VARCHAR(255) DEFAULT '25d55ad283aa400af464c76d713c07ad',"+               //离线登录密码
			            "REALNAME VARCHAR(255),"+                //真实姓名
			            "STATUS VARCHAR(255),"+                  //用户状态
			            "USERNAME VARCHAR(30),"+                 //登录名称
			            "DID VARCHAR(100),"+                       //部门ID
			            "DNAME VARCHAR(255),"+                   //部门名称
			            "OID VARCHAR(100),"+                       //机构ID
			            "ONAME VARCHAR(255),"+                   //机构名称
			            "XZQHID BIGINT(20),"+                     //行政区划ID
			            "XZQHNAME VARCHAR(255)"+                     //行政区划名称
			            ")", 
			            [], 
			            function(tx,result){ 
			            	//message('创建用户表成功'); 
			            }, 
			            function(tx,error){
			            	message('创建用户表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建抽屉表 drawer
 **/
function createDrawer(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS DRAWER(" +
			            "ID VARCHAR(100)," +                      //抽屉主键
			            /*"CREATETIME VARCHAR(20)," +   */
			            "NAME VARCHAR(255)," +                  //名称
			            "SORT BIGINT(20)," +                    //序号
			            "STATUS VARCHAR(255),"+                 //状态
			            "PID VARCHAR(100)"+                       //父节点ID
			            ")", 
			            [], 
			            function(tx,result){
			            	//message('创建字典表成功'); 
			            }, 
			            function(tx,error){
			            	message('创建字典表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建机构环节文书关联表 CaseLinkDocument
 **/
function createCaseLinkDocument(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_LINK_DOCUMENT(" +
			            "LINK_DOCUMENT_ID VARCHAR(100)," +         //主键
			            /*"CREATEID VARCHAR(255)," +
			            "CREATE_NAME VARCHAR(20)," +
			            "CREATE_TIME VARCHAR(255)," +
			            "MODIFY_ID VARCHAR(20)," +
			            "MODIFY_TIME VARCHAR(255)," +
			            "NOTE VARCHAR(255)," +*/
			            "DOCNAMEID VARCHAR(255)," +              //文书名称ID
			            "LINKNAMEID VARCHAR(255)," +             //环节名称ID
			            "DOCNAME VARCHAR(255)," +                //文书名称
			            "LINKNAME VARCHAR(255)," +               //环节名称
			            "DOCPATH VARCHAR(255)," +                //文书路径
			            "GXHDOCPATH VARCHAR(255)," +                //个性化文书路径
			            "TSINPUT VARCHAR(255)," +                //特殊文书标识
			            "SORT BIGINT(20)," +                     //文书序号
			            "REQUIRED VARCHAR(255)," +               //必要环节1、是；0、否
			            "OID VARCHAR(100)"+                        //机构ID
			            ")", 
			            [], 
			            function(tx,result){ 
			            	//message('创建机构环节文书关联表成功'); 
			            }, 
			            function(tx,error){
			            	message('创建机构环节文书关联表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建案件编号表 CaseNumber
 **/
function createCaseNumber(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_NUMBER(" +
			            "CASE_NUMBER_ID VARCHAR(255)," +         //主键
			            "REGEX VARCHAR(255)," +   
			            "ORGANID VARCHAR(100)," +               
			            "CASEWORD VARCHAR(255)," +                
			            "CASEYEAR BIGINT(20)," +                
			            "ONLINENUMBER BIGINT(20)," + 
			            "OFFLINENUMBER BIGINT(20)," +   
			            "STARTNUMBER BIGINT(20),"+    
			            "ENDNUMBER BIGINT(20),"+ 
			            "DIGIT BIGINT(20)"+                 
			            ")", 
			            [], 
			            function(tx,result){ 
			            	//message('创建案件编号表成功'); 
			            }, 
			            function(tx,error){
			            	message('创建案件编号表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建机构执法门类表
 **/
function createOrganZfml(){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS ORGANZFML(" +
			            "CASE_ORGAN_ZFML_ID VARCHAR(255)," +                 
			            "ORGANID VARCHAR(100)," +             //机构ID
			            "ORGANNAME VARCHAR(255)," +         //机构名称
			            "ZFML VARCHAR(255),"+               //执法门类
			            "ZFMLID VARCHAR(255)"+              //执法门类ID
			            ")", 
			            [], 
			            function(tx,result){
			            	//message('创建机构执法门类表成功'); 
			            }, 
			            function(tx,error){
			            	message('创建机构执法门类表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建法条数据表 CASE_LAW_CONTENT
 */
function createLawContent(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_LAW_CONTENT(" +
			            "CASE_LAW_CONTENT_ID INTEGER," +
/*			            "STRCHAPTER BIGINT(20)," +
			            "STRSECTION BIGINT(20)," +*/
			            "STRITEM BIGINT(20)," +
			            "STRCLAUSE BIGINT(20)," +
			            "STRIITEM BIGINT(20)," +
			            "STRCODE VARCHAR(20)," +
			            "AMOUNT VARCHAR(20)," +
			            "UPPERLIMIT VARCHAR(20)," +
			            "LAWERLIMIT VARCHAR(20)," +
			            "STRCONTENT VARCHAR(4000)," +
			            "YJTL VARCHAR(4000)," +
			            "CFBZ VARCHAR(4000)," +
			            "BID INTEGER," +
			            "STRNAME VARCHAR(4000)," +
			            "STRNUMBER VARCHAR(4000)," +
			            "CASE_CAUSE_ID INTEGER" +
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建法条表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建违法行为数据表 CASE_CAUSE
 */
function createCaseCause(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_CAUSE(" +
			            "CASE_CAUSE_ID INTEGER," +
			            "CAUSENUMBER VARCHAR(20)," +
			            "ZFML VARCHAR(20)," +
			            "ZFMLID VARCHAR(20)," +
			            "CAUSECONTENT VARCHAR(4000)" +
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建违法行为表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建自由裁量权数据表 CASE_DISCRETION
 */
function createDiscretion(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_DISCRETION(" +
			            "CASE_DISCRETION_ID VARCHAR(20)," +
			            "WFCD VARCHAR(20)," +
			            "WFCDID VARCHAR(20)," +
			            "WFQJ VARCHAR(2000)," +
			            "DCFBZ VARCHAR(2000)," +
			            "UPPERLIMIT VARCHAR(20)," +
			            "LAWERLIMIT VARCHAR(20)," +
			            "CASE_CAUSE_ID INTEGER" +
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建自由裁量权表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建立案地址数据表 CASE_FILLINGPLACE
 */
function createCaseFillingPlace(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_FILLINGPLACE(" +
			            "CASE_FILLINGPLACE_ID INTEGER primary key AutoIncrement," +
			            "ADDRESS VARCHAR(200)," +
			            "ORGANID VARCHAR(100)," +
			            "ORGANNAME VARCHAR(200)," +
			            "CREATE_TIME DATETIME "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建立案地址表失败'); 
			            }
				);
		    }
		);
	}
}


/**
 * 创建执法人员数据表 CASE_STAFF
 */
function createCaseSTAFF(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_STAFF(" +
			            "CASE_STAFF_ID INTEGER primary key AutoIncrement," +
			            "STAFF_NAME VARCHAR(200) NOT NULL," +
			            "STAFF_CERTIFICATEID VARCHAR(200) NOT NULL," +
			            "ORGANID VARCHAR(100) NOT NULL," +
			            "ORGANNAME VARCHAR(200)," +
			            "CREATE_TIME DATETIME "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建执法人员表失败'); 
			            }
				);
		    }
		);
	}
}


/**
 * 创建行政处罚种类数据表 CASE_ADMINISTRATIVE_PUNISHMENT
 */
function createAdministrativePunishment(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_ADMINISTRATIVE_PUNISHMENT(" +
			            "CASE_ADMINISTRATIVEPUNISHMENT_ID INTEGER primary key AutoIncrement," +
			            "ADMINISTRATIVEPUNISHMENT_NAME VARCHAR(200) NOT NULL," +
			            "ORGAN_ID VARCHAR(200)," +
			            "IS_COMMON VARCHAR(200)," +
			            "CREATE_TIME DATETIME "+
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建行政处罚种类表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 创建案件版本号表 CASE_VERSION
 */
function createCaseVersion(callback){
	if(db){
		db.transaction(
			function(tx) {
			    tx.executeSql(
			            "CREATE TABLE IF NOT EXISTS CASE_VERSION(" +
			            "CASE_VERSION_ID INTEGER," +
			            "GXFS VARCHAR(200)," + /**修改方式：手动，自动 **/
			            "GXDATE DATETIME,"+     /**修改日期 **/
			            "ORGANID VARCHAR(100)"+     /**修改机构ID **/
			            ")", 
			            [], 
			            function(tx,result){ 
			            	if(typeof(callback)=='function'){
			            		callback();
			            	}
			            }, 
			            function(tx,error){
			            	message('创建案件版本号表失败'); 
			            }
				);
		    }
		);
	}
}

/**
 * 删除信息查验表
 */
function dropXXCY(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE XXCY", [], 
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('删除信息查验表失败');
							}
					);
				}
		);
	}
}
/**
 * 删除机构表 organ
 * @param callback
 */
function dropOrgan(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE ORGAN", [], 
							function(tx,result){ 
								if(typeof(callback)=='function'){
									callback();
								}
							}, 
							function(tx,error){
								message('删除机构表失败');
							}
					);
				}
		);
	}
}
/**
 * 删除部门表 depart
 * @param callback
 */
function dropDepart(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE DEPART", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除部门表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除用户表 user
 * @param callback
 */
function dropUser(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE USER", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除用户表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除抽屉表 drawer
 * @param callback
 */
function dropDrawer(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE DRAWER", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除抽屉表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除机构环节文书关联表 CaseLinkDocument
 * @param callback
 */
function dropCaseLinkDocument(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_LINK_DOCUMENT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除机构环节文书关联表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除案件编号表 CaseNumber
 * @param callback
 */
function dropCaseNumber(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_NUMBER", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除案件编号表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除机构执法门类表 OrganZfml
 * @param callback
 */
function dropOrganZfml(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE ORGANZFML", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除机构执法门类表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除违法行为表 CaseCause
 * @param callback
 */
function dropCaseCause(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_CAUSE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除违法行为表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除法条表 LawContent
 * @param callback
 */
function dropLawContent(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_LAW_CONTENT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除法条表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除自由裁量权表 Discretion
 * @param callback
 */
function dropDiscretion(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DISCRETION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除自由裁量权表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除立案地址表 CaseFillingPlace
 * @param callback
 */
function dropCaseFillingPlace(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_FILLINGPLACE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除立案地址表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除执法人员表 CaseSTAFF
 * @param callback
 */
function dropCaseSTAFF(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_STAFF", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除执法人员表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除行政处罚种类表 AdministrativePunishment
 * @param callback
 */
function dropAdministrativePunishment(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_ADMINISTRATIVE_PUNISHMENT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除行政处罚种类表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除案件版本号表 CaseVersion
 * @param callback
 */
function dropCaseVersion(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_VERSION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除案件版本号表失败');
					}
					);
				}
		);
	}
}



/**
 * 删除案件登记表 CaseBasicInfo
 * @param callback
 */
function dropCaseBasicInfo(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_BASICINFO", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除案件登记表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除案件登记处理表 CaseBasicInfoCl
 * @param callback
 */
function dropCaseBasicInfoCl(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_BASICINFOCL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除案件登记处理表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除行政强制执行申请书表 AdminEnforceApplication
 * @param callback
 */
function dropAdminEnforceApplication(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ADMINENFORCEAPPLICATION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除行政强制执行申请书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除协助调查通知书表  AssistInvest
 * @param callback
 */
function dropAssistInvest(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ASSISTINVEST", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除协助调查通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除回避申请书表  AvoidApply
 * @param callback
 */
function dropAvoidApply(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_AVOIDAPPLY", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除回避申请书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除同意回避申请书表  AvoidApplyAgree
 * @param callback
 */
function dropAvoidApplyAgree(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_AVOIDAPPLYAGREE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除同意回避申请书表失败');
					}
					);
				}
		);
	}
}
/**
 * 删除驳回回避申请书表  AvoidApplyReject
 * @param callback
 */
function dropAvoidApplyReject(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_AVOIDAPPLYREJECT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除驳回回避申请书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除取案件处理意见书表   CaseProcessIdea 
 * @param callback
 */
function dropCaseProcessIdea(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_CASEPROCESSIDEA", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除取案件处理意见书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除案件处理意见书明细表  CaseProcessIdeaDetail
 * @param callback
 */
function dropCaseProcessIdeaDetail(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_CASEPROCESSIDEA_DETAIL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除案件处理意见书明细表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除分期（延期）缴纳罚款申请书表  DelayPayfineApply
 * @param callback
 */
function dropDelayPayfineApply(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_DELAYPAYFINEAPPLY", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除分期（延期）缴纳罚款申请书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除同意分期（延期）缴纳罚款通知书表  DelayPayfineApplyAgree
 * @param callback
 */
function dropDelayPayfineApplyAgree(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_DELAYPAYFINEAPPLYAGREE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除同意分期（延期）缴纳罚款通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除文书送达回证表  DocumentReceipt
 * @param callback
 */
function dropDocumentReceipt(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_DOCUMENTRECEIPT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除文书送达回证表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除文书送达回证明细表   DocumentReceiptDetail
 * @param callback
 */
function dropDocumentReceiptDetail(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_DOCUMENTRECEIPT_DETAIL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除文书送达回证明细表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除委托鉴定书明细表   EntrustIdentifyDetail
 * @param callback
 */
function dropEntrustIdentifyDetail(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ENTRUSTIDENTIFY_DETAIL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除委托鉴定书明细表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除委托鉴定书表  EntrustIdentify
 * @param callback
 */
function dropEntrustIdentify(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ENTRUSTIDENTIFY", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除委托鉴定书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除证据登记保存清单表   EvidenceList
 * @param callback
 */
function dropEvidenceList(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_EVIDENCELIST", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除证据登记保存清单表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除证据登记保存清单明细表   EvidenceListDetail 
 * @param callback
 */
function dropEvidenceListDetail(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_EVIDENCELIST_DETAIL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除证据登记保存清单明细表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除证据登记保存处理决定书表  EvidenceTreatmentDecision
 * @param callback
 */
function dropEvidenceTreatmentDecision(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_EVIDENCETREATMENTDECISION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除证据登记保存处理决定书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除立案审批表  FillingApprove
 * @param callback
 */
function dropFillingApprove(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_FILLINGAPPROVE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除立案审批表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除听证公告表   HearingBulletin
 * @param callback
 */
function dropHearingBulletin(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_HEARINGBULLETIN", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除听证公告表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除听证委托书表	 HearingEntrust
 * @param callback
 */
function dropHearingEntrust(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_HEARINGENTRUST", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除听证委托书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除听证笔录表   HearingNotes
 * @param callback
 */
function dropHearingNotes(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_HEARINGNOTES", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除听证笔录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除听证通知书表   HearingNotice
 * @param callback
 */
function dropHearingNotice(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_HEARINGNOTICE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除听证通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除听证报告书表   HearingReport
 * @param callback
 */
function dropHearingReport(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_HEARINGREPORT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除听证报告书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除鉴定意见书表   IdentifyOpinion
 * @param callback
 */
function dropIdentifyOpinion(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_IDENTIFYOPINION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除鉴定意见书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除违法行为通知书表   IllegalAction
 * @param callback
 */
function dropIllegalAction(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ILLEGALACTION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除违法行为通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除重大案件集体讨论记录表  ImportantCaseGroupDiscussion
 * @param callback
 */
function dropImportantCaseGroupDiscussion(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_IMPORTANTCASEGROUPDISCUSSION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除重大案件集体讨论记录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除勘验笔录表   InquestNotes
 * @param callback
 */
function dropInquestNotes(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_INQUESTNOTES", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除勘验笔录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除询问笔录表  InquiryNotes
 * @param callback
 */
function dropInquiryNotes(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_INQUIRYNOTES", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除询问笔录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除不予分期（延期）缴纳罚款通知书表   NondelayPayfineApply
 * @param callback
 */
function dropNondelayPayfineApply(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_NONDELAYPAYFINEAPPLY", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除不予分期（延期）缴纳罚款通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除不予行政处罚决定书表  NonpunishmentDecision
 * @param callback
 */
function dropNonpunishmentDecision(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_NONPUNISHMENTDECISION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除不予行政处罚决定书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除责令改正通知书表   OrderCorrect
 * @param callback
 */
function dropOrderCorrect(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_ORDERCORRECT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除责令改正通知书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除行政处罚决定书表   PunishementDecision
 * @param callback
 */
function dropPunishementDecision(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_PUNISHMENTDECISION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除行政处罚决定书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除处罚结案报告表  PunishmentFinalReport
 * @param callback
 */
function dropPunishmentFinalReport(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_PUNISHMENTFINALREPORT", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除处罚结案报告表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除举报记录表  ReportRecord
 * @param callback
 */
function dropReportRecord(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_REPORTRECORD", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除举报记录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除抽样取证凭证表  SampleEvidence
 * @param callback
 */
function dropSampleEvidence(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_SAMPLEEVIDENCE", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除抽样取证凭证表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除抽样取证凭证明细表  SampleEvidenceDetail
 * @param callback
 */
function dropSampleEvidenceDetail(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_SAMPLEEVIDENCE_DETAIL", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除抽样取证凭证明细表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除现场笔录表   SceneNotes
 * @param callback
 */
function dropSceneNotes(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_SCENENOTES", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除现场笔录表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除行政（当场）处罚决定书表  SpotPunishmentDecision
 * @param callback
 */
function dropSpotPunishmentDecision(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_SPOTPUNISHMENTDECISION", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
					}, 
					function(tx,error){
						message('删除行政（当场）处罚决定书表失败');
					}
					);
				}
		);
	}
}

/**
 * 删除陈述申辩书表   StatementExplain
 * @param callback
 */
function dropStatementExplain(callback){
	if(db){
		db.transaction(
				function(tx) {
					tx.executeSql("DROP TABLE CASE_DOCU_STATEMENTEXPLAIN", [], 
							function(tx,result){ 
						if(typeof(callback)=='function'){
							callback();
						}
						message("数据表创建完成");
						$.messager.progress('close');
					}, 
					function(tx,error){
						message('删除陈述申辩书表失败');
					}
					);
				}
		);
	}
}
